package week_home_work02;

import java.util.Scanner;

/**
 * @author zdl
 * @date 2024/11/23
 */
public class Demo58_false {
    public static void main(String[] args) {
        //判断两个字符串是否是回文字符串（忽略大小写）。
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串:");
        String str = sc.next();
        int num = Integer.parseInt(str);
        int yuanNum = num;
        int fanNum = 0;
        while (num != 0){
            int lastNum = num % 10;
            fanNum = fanNum * 10 +lastNum;
            num/=10;
        }
        if (fanNum == yuanNum){
            System.out.println(yuanNum+"是一个回文数");
        }else {
            System.out.println(yuanNum+"不是回文数");
        }
    }
}
